/**
 * ScriptResponseAPI.java
 * ************************** 
 * @date May 13, 2011
 * @author Michele Tamburini
 * 
 * **************************
 */
package infrastructureAPI.backendGate.scriptsResponse;

import java.rmi.Remote;
import java.rmi.RemoteException;

import messages.Message;

/**
 * Description: 
 * This is a remote interface used by all scripts that need
 * a return answer from the cloud. 
 * Once the script submits the request packed in a RequestMessage,
 * it has to wait for the answer. 
 * In the meantime into the cloud one or more nodes takes care
 * of the request. Once the node (or all involved nodes) are
 * ready to reply it (they) will call the depositResponse() method.
 *
 */
public interface ResponseScripAPIRemote extends Remote {

	/**
	 * Method called by a node which has to answer to a RequestMessage
	 * that has been performed by a CloudUser.
	 * The input Message 'respMsg' will be deposited into the 
	 * message queue of the Requester node.
	 * @param respMsg : Message
	 * @return
	 * @throws RemoteException
	 */
	public boolean depositResponse(Message respMsg) throws RemoteException;
}
